<!DOCTYPE html>
<html class="x-admin-sm">
<head>
    <meta charset="UTF-8">
    <title>数据迁移</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link rel="stylesheet" href="__HOME_CSS__/font.css">
    <link rel="stylesheet" href="__HOME_CSS__/xadmin.css">
    <script src="__HOME_JS__/echarts.min.js"></script>
    <script src="__HOME_LIB__/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="__HOME_JS__/xadmin.js"></script>
    <!--[if lt IE 9]>
    <script src="__HOME_JS__/html5.min.js"></script>
    <script src="__HOME_JS__/respond.min.js"></script>
    <![endif]-->
</head>
<body>
<div class="x-nav">
          <span class="layui-breadcrumb">
            <a href="javascript:void(0);">后台首页</a>
            <a href="javascript:void(0);">管理员设置</a>
            <a>
              <cite>迁移用户数据到刷卡管理系统</cite></a>
          </span>
    <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" onclick="location.reload()" title="刷新">
        <i class="layui-icon layui-icon-refresh" style="line-height:30px"></i></a>
</div>
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-body ">
                    <hr>
                    <blockquote class="layui-elem-quote" style="color: red;font-size: 16px">
                        * 将用户数据向刷卡系统迁移,此操作仅迁移用户数据及设备基本信息。其他记录数据将清除，慎重操作！
                    </blockquote>
                </div>

<!--                <div class="layui-card-header">-->
<!--                    <button class="layui-btn" onclick="cover_to_door()"><i class="layui-icon"></i>向智能柜系统迁移</button>-->
<!--                </div>-->

                <div class="layui-card-header">
                    <button class="layui-btn" onclick="cover_to_card()"><i class="layui-icon"></i>向刷卡系统迁移</button>
                </div>

            </div>
        </div>
    </div>
</div>
</body>
<script>
    var big_mask;
    layui.use(['laydate','form'], function(){
        $ = layui.jquery;

        var laydate = layui.laydate;

        //执行一个laydate实例
        laydate.render({
            elem: '#end' //指定元素
        });

        $('.big_loading_mask',window.parent.document).on('click',function () {
            cancel();
        });

    });
    function cover_to_card () {
        layer.confirm('确认要迁移数据到刷卡系统吗？',function(index){
            layer.confirm('执行操作后刷卡系统仅拥有用户数据，确定操作？',function(index){
                $.ajax({
                    url: "{:url('index/admin/door_to_card')}",
                    type: "get",
                    success: function (res) {
                        if (res.code === 0) {
                            layer.msg(res.msg,{icon:1,time:1000});
                        }else{
                            layer.msg(res.msg,{icon:5,time:1000});
                        }
                    }
                });
            });
        });
    }

    // function cover_to_door () {
    //     layer.confirm('确认要迁移数据到智能柜吗？',function(index){
    //         layer.confirm('执行操作后智能柜系统仅拥有用户数据，确定操作？',function(index){
    //             $.ajax({
    //                 url: "{:url('index/admin/card_to_door')}",
    //                 type: "get",
    //                 success: function (res) {
    //                     if (res.code === 0) {
    //                         layer.msg(res.msg,{icon:1,time:1000});
    //                     }else{
    //                         layer.msg(res.msg,{icon:5,time:1000});
    //                     }
    //                 }
    //             });
    //         });
    //     });
    // }

</script>
</html>